package com.ruoyi.qywx.mapper;

import com.ruoyi.common.core.basic.BasicMapper;
import com.ruoyi.qywx.entity.Survey;
import com.ruoyi.qywx.entity.SurveyAnswer;
import com.ruoyi.qywx.model.vo.SurveyVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : hcl
 * @Date : 2023/9/14 14:04
 */
@Mapper
public interface SurveyMapper extends BasicMapper<Survey> {
    List<SurveyVo> selectSurveyList(@Param("keyword") String keyword, @Param("teamId") Long teamId);

    String selectQuestionBySurveyId(@Param("surveyId") Long surveyId);

    void insertQuestion(@Param("surveyId") Long surveyId, @Param("question") String question);

    void updateQuestion(@Param("surveyId") Long surveyId, @Param("question") String question);

    void insertSurveyAnswer(@Param("aw") SurveyAnswer userAnswer);

    int selectUserAnswerCount(@Param("surveyId") Long surveyId, @Param("uuid") String uuid);
}
